package models.desease;

public abstract class Disease {
	private String name;
	private String color;
	private boolean isCured;
	private boolean isEradicated;
	private int infectionsLeft;
	private static final int NUMBER_OF_INFECTIONS = 20;

	Disease(final String name, final String color) {
		this.name = name;
		this.color = color;
		this.isCured = false;
		this.isEradicated = false;
		this.infectionsLeft = NUMBER_OF_INFECTIONS;
	}

	public static int getNumberOfInfections() {
		return NUMBER_OF_INFECTIONS;
	}
	
	public String getName() {
		return name;
	}

	public String getColor() {
		return color;
	}

	public boolean getIsCured() {
		return this.isCured;
	}

	public boolean getIsEradicated() {
		return this.isEradicated;
	}

	public void setCured(boolean isCured) {
		this.isCured = isCured;
	}

	public void setEradicated(boolean isEradicated) {
		this.isEradicated = isEradicated;
	}

	public int getInfectionsLeft() {
		return infectionsLeft;
	}

	public void decreaseInfectionsLeft() {
		this.infectionsLeft = this.infectionsLeft - 1;
	}

	public void increaseInfectionsLeft() {
		this.infectionsLeft = this.infectionsLeft + 1;
	}

	@Override
	public String toString() {
		return "Disease [name=" + name + ", color=" + color + ", isCured="
				+ isCured + ", isEradicated=" + isEradicated
				+ ", infectionsLeft=" + infectionsLeft + "]";
	}
}
